package main

import (
	"github.com/ngaut/log"
	"global/structs"
)

type manager struct{}

func (m *manager) run(k *Kline) {
	log.Infof("server run ....")
	for _, pair := range k.data.CoinPair {
		go func(pair structs.CoinPair) {
			w := NewKlineWorker(k, pair)
			w.start()
			k.RegistKlineWorker(pair.Name, w)

			d := NewDepth(k, pair)
			d.Run()
			k.RegistDepth(pair.Name, d)
		}(pair)
	}
}
